package com.sqx.modules.health.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.modules.health.entity.Agent;
import com.sqx.modules.health.entity.Recordset;
import com.sqx.modules.sys.entity.SysUserEntity;
import com.sqx.modules.health.mapper.AgentMapper;
import com.sqx.modules.health.service.IAgentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 代理商信息 服务实现类
 * </p>
 *
 * @author xglhappy
 * @since 2022-04-27
 */
@Service
public class AgentServiceImpl extends ServiceImpl<AgentMapper, Agent> implements IAgentService {

    @Autowired
    private AgentMapper agentMapper;
    @Override
    public SysUserEntity getUserByFlag(String flag) {
        return agentMapper.getUserByFlag(flag);
    }
    @Override
    public Agent getAgentByFlag(String flag) {
        return agentMapper.getAgentByFlag(flag);
    }
    @Override
    public Integer bindingHospital(Long deviceid, Long hid, Long agentid) {
        return agentMapper.bindingHospital(deviceid, hid, agentid);
    }
    @Override
    public Integer editOperation(Long deviceid, Long agentid) {
        return agentMapper.editOperation(agentid, deviceid);
    }
    @Override
    public Agent filterOperation(String agentName) {
        return agentMapper.filterOperation(agentName);
    }
    @Override
    public List<Recordset> getDeviceUserRecordByAgentid(Long agentid) {
        return agentMapper.getDeviceUserRecordByAgentid(agentid);
    }
    @Override
    public List<Recordset> getDeviceUserRecordByHid(Long hid) {
        return agentMapper.getDeviceUserRecordByHid(hid);
    }


}
